import { requestClient,requestClientBody } from '#/api/request';

/**
 * 列表
 */
export async function getListApi(params: any) {
  let searchParams = new URLSearchParams(params);
  return requestClient.get('/user.grade/lists?'+searchParams.toString());
}

/**
 * 全部
 */
export async function getAllApi(params: any) {
  let searchParams = new URLSearchParams(params);
  return requestClient.get('/user.grade/all?'+searchParams.toString());
}
  
/**
 * 新增
 */
export async function createApi(data: any) {
  return requestClientBody.post('/user.grade/add', {form:data});
}

/**
 * 编辑
 */
export async function editApi(data: any) {
  return requestClientBody.post('/user.grade/edit?id='+data.grade_id, {form:data});
}

/**
 * 更新状态
 */
export async function setstatusApi(data: any) {
  return requestClientBody.post('/user.grade/setstatus', data);
}

/**
 * 删除
 */
export async function deleteApi(id: number) {
  return requestClientBody.post('/user.grade/delete?id='+id);
}

/**
 * 日志
 */
export async function getLogApi(params: any) {
  let searchParams = new URLSearchParams(params);
  return requestClient.get('/user.grade/log?'+searchParams.toString());
}

/**
 * 变更类型
 */
export async function getChangeTypeApi() {
  return requestClient.get('/user.grade/getChangeType');
}